#pragma once

#include "ListItemDetail.h"
#include "List.h"

class CListDetails : public CList
{
public:
  CListDetails(HWND hParent = NULL);

  virtual void Clear();

  void  Create(CEOID oId, ESpecialIcons eNoPic, const TCHAR* szName);
  CEOID GetOid()
  { return m_oId; }

  virtual void Prepare(HDC hdc, const RECT& rc);

  bool AddHeader(const TCHAR* name, const TCHAR* company = NULL, const TCHAR* department = NULL, const TCHAR* position = NULL, const TCHAR* birthday = NULL, const TCHAR* anniversary = NULL);
  bool AddAction(ItemPropertyType type, const TCHAR* text, ListItemAction action, ListItemAction subAction = liaNone, bool isDefault = false, CEPROPID propId = 0);
  bool AddString(ItemPropertyType type, const TCHAR* string);
  bool AddText(ItemPropertyType type, const TCHAR* text);
  bool AddRingtone(const TCHAR* text);

  virtual bool OnMouseDown(int x, int y);
  virtual bool OnMouseMove(int x, int y);

  virtual bool OnKeyDown(int vKey, bool bRepeating);

  void ScrollBar(int y);

  virtual void DrawOverlays(HDC hdc, HDC hdcTmp, const RECT& rClip);

protected:
  CEOID m_oId;
  ESpecialIcons m_eNoPic;
  TCHAR m_szName[PRIMARY_TEXT_LENGTH];

  void DrawScrollBar(HDC hdc, const RECT& rClip);
};
